<template>
  <div class="login">
    <div class="bg"></div>
    <div class="login-title">登录</div>
    <div class="login-username">
      <div class="use1"> <text>手机号:</text><input type="text" placeholder="请输入用户名" v-model="phone"><br/></div>
       <div class="use2"><text>密码:&nbsp;&nbsp;&nbsp;&nbsp;</text><input type="password" v-model="password"></div>
    </div>
    <div class="login-btn">
      <van-button round type="primary" size="small" @click="toLogin">登录</van-button>
      <van-button round type="primary" size="small" class="btn" @click="toYou">游客登录</van-button>
      </div>
  </div>
</template>

<script>
import {ref} from 'vue'
import {useStore} from 'vuex'
import{getYouKe} from '@/axios/api/home.js'
export default {
 setup(){
   const phone = ref()
   const password=ref()
  const store = useStore()
  
  function toLogin(){
   alert('登录接口失效')
    
  }
 async function toYou(){
      alert('游客登录接口失效')

  }
   return {phone,password,toLogin,toYou}
 }
}
</script>

<style lang="less">
.login{
      width:100%;
      .bg{
        position: relative;
        background: url('@/assets/girl.jpg');
        width:100%;
        height:100vh;
        background-position: center;
        background-size:cover;
        opacity: .9;
      }
  .login-title{
    position:absolute;
    top:2rem;
     width:100%;
     text-align: center;
     font-size: 0.66rem;
     background: linear-gradient(rgb(235, 6, 6),rgb(3, 16, 190),rgb(145, 2, 97));
     background-clip: text;
     color:transparent;
  }
  .login-username{
    position:absolute;
    top:3.6rem;
    left:1rem;
     text{
     font-weight: 600;
     background: linear-gradient(rgb(224, 101, 101),rgb(44, 9, 245),rgb(2, 48, 48));
     background-clip: text;
     color:transparent;
   }
    .use2{
    margin-top:0.3rem
    }
  }
  .login-btn{
  display: flex;
  position:absolute;
  top:5.6rem;
  left:2.6rem;

  .btn{
    margin-left:0.36rem;
  }
  }
}

</style>